Optimal. Leaf size=56 \[ -\frac {\tan ^{-1}\left (\frac {\sqrt {\frac {2}{11}} (1+2 x)}{\sqrt {5+x+x^2}}\right )}{\sqrt {22}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {5+x+x^2}}{\sqrt {2}}\right )}{\sqrt {2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1039, 996, 210,
1038, 212} \begin {gather*} -\frac {\text {ArcTan}\left (\frac {\sqrt {\frac {2}{11}} (2 x+1)}{\sqrt {x^2+x+5}}\right )}{\sqrt {22}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {x^2+x+5}}{\sqrt {2}}\right )}{\sqrt {2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 212
Rule 996
Rule 1038
Rule 1039
Rubi steps
\begin {align*} \int \frac {x}{\left (3+x+x^2\right ) \sqrt {5+x+x^2}} \, dx &=-\left (\frac {1}{2} \int \frac {1}{\left (3+x+x^2\right ) \sqrt {5+x+x^2}} \, dx\right )+\frac {1}{2} \int \frac {1+2 x}{\left (3+x+x^2\right ) \sqrt {5+x+x^2}} \, dx\\ &=\text {Subst}\left (\int \frac {1}{-11-2 x^2} \, dx,x,\frac {1+2 x}{\sqrt {5+x+x^2}}\right )-\text {Subst}\left (\int \frac {1}{2-x^2} \, dx,x,\sqrt {5+x+x^2}\right )\\ &=-\frac {\tan ^{-1}\left (\frac {\sqrt {\frac {2}{11}} (1+2 x)}{\sqrt {5+x+x^2}}\right )}{\sqrt {22}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {5+x+x^2}}{\sqrt {2}}\right )}{\sqrt {2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 0.13, size = 92, normalized size = 1.64 \begin {gather*} \text {RootSum}\left [23-2 \text {$\#$1}+3 \text {$\#$1}^2-2 \text {$\#$1}^3+\text {$\#$1}^4\&,\frac {-5 \log \left (-x+\sqrt {5+x+x^2}-\text {$\#$1}\right )+\log \left (-x+\sqrt {5+x+x^2}-\text {$\#$1}\right ) \text {$\#$1}^2}{-1+3 \text {$\#$1}-3 \text {$\#$1}^2+2 \text {$\#$1}^3}\&\right ] \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.37, size = 45, normalized size = 0.80
method | result | size |
default | \(-\frac {\arctanh \left (\frac {\sqrt {x^{2}+x +5}\, \sqrt {2}}{2}\right ) \sqrt {2}}{2}-\frac {\arctan \left (\frac {\left (2 x +1\right ) \sqrt {22}}{11 \sqrt {x^{2}+x +5}}\right ) \sqrt {22}}{22}\) | \(45\) |
trager | \(\frac {22 \ln \left (-\frac {-22990 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{5} x +2079 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{3} x +990 \sqrt {x^{2}+x +5}\, \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{2}+5115 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{3}+106 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right ) x -57 \sqrt {x^{2}+x +5}+186 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )}{22 x \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{2}-3 x -3}\right ) \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{3}}{3}-\frac {5 \ln \left (-\frac {-22990 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{5} x +2079 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{3} x +990 \sqrt {x^{2}+x +5}\, \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{2}+5115 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{3}+106 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right ) x -57 \sqrt {x^{2}+x +5}+186 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )}{22 x \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{2}-3 x -3}\right ) \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )}{3}-\RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right ) \ln \left (\frac {133342 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{5} x -34298 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{3} x +2970 \sqrt {x^{2}+x +5}\, \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{2}+29667 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{3}+2100 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right ) x -504 \sqrt {x^{2}+x +5}-4650 \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )}{22 x \RootOf \left (484 \textit {\_Z}^{4}-110 \textit {\_Z}^{2}+9\right )^{2}-2 x +3}\right )\) | \(492\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 307 vs.
\(2 (44) = 88\).
time = 0.35, size = 307, normalized size = 5.48 \begin {gather*} -\frac {1}{33} \, \sqrt {11} \sqrt {6} \sqrt {3} \arctan \left (\frac {2}{33} \, \sqrt {11} \sqrt {3} \sqrt {\sqrt {6} \sqrt {3} {\left (2 \, x + 1\right )} + 6 \, x^{2} - \sqrt {x^{2} + x + 5} {\left (2 \, \sqrt {6} \sqrt {3} + 6 \, x + 3\right )} + 6 \, x + 30} + \frac {1}{33} \, \sqrt {11} {\left (2 \, \sqrt {6} \sqrt {3} + 6 \, x + 3\right )} - \frac {2}{11} \, \sqrt {11} \sqrt {x^{2} + x + 5}\right ) + \frac {1}{33} \, \sqrt {11} \sqrt {6} \sqrt {3} \arctan \left (-\frac {1}{33} \, \sqrt {11} {\left (2 \, \sqrt {6} \sqrt {3} - 6 \, x - 3\right )} + \frac {1}{33} \, \sqrt {11} \sqrt {-12 \, \sqrt {6} \sqrt {3} {\left (2 \, x + 1\right )} + 72 \, x^{2} + 12 \, \sqrt {x^{2} + x + 5} {\left (2 \, \sqrt {6} \sqrt {3} - 6 \, x - 3\right )} + 72 \, x + 360} - \frac {2}{11} \, \sqrt {11} \sqrt {x^{2} + x + 5}\right ) + \frac {1}{12} \, \sqrt {6} \sqrt {3} \log \left (12 \, \sqrt {6} \sqrt {3} {\left (2 \, x + 1\right )} + 72 \, x^{2} - 12 \, \sqrt {x^{2} + x + 5} {\left (2 \, \sqrt {6} \sqrt {3} + 6 \, x + 3\right )} + 72 \, x + 360\right ) - \frac {1}{12} \, \sqrt {6} \sqrt {3} \log \left (-12 \, \sqrt {6} \sqrt {3} {\left (2 \, x + 1\right )} + 72 \, x^{2} + 12 \, \sqrt {x^{2} + x + 5} {\left (2 \, \sqrt {6} \sqrt {3} - 6 \, x - 3\right )} + 72 \, x + 360\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x}{\left (x^{2} + x + 3\right ) \sqrt {x^{2} + x + 5}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 133 vs.
\(2 (44) = 88\).
time = 4.05, size = 133, normalized size = 2.38 \begin {gather*} \frac {1}{22} \, \sqrt {11} \sqrt {2} \arctan \left (-\frac {1}{11} \, \sqrt {11} {\left (2 \, x + 2 \, \sqrt {2} - 2 \, \sqrt {x^{2} + x + 5} + 1\right )}\right ) - \frac {1}{22} \, \sqrt {11} \sqrt {2} \arctan \left (-\frac {1}{11} \, \sqrt {11} {\left (2 \, x - 2 \, \sqrt {2} - 2 \, \sqrt {x^{2} + x + 5} + 1\right )}\right ) + \frac {1}{4} \, \sqrt {2} \log \left (324 \, {\left (2 \, x + 2 \, \sqrt {2} - 2 \, \sqrt {x^{2} + x + 5} + 1\right )}^{2} + 3564\right ) - \frac {1}{4} \, \sqrt {2} \log \left (324 \, {\left (2 \, x - 2 \, \sqrt {2} - 2 \, \sqrt {x^{2} + x + 5} + 1\right )}^{2} + 3564\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {x}{\left (x^2+x+3\right )\,\sqrt {x^2+x+5}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________